<?php

namespace App\Http\Controllers\Teacher;

use App\Criteria\Teacher\Teacher\CompositionBaseQueryCriteria;
use App\Http\Controllers\Controller;
use App\Http\Controllers\CurlRecordMethod;
use App\Http\Requests\Teacher\CompositionBaseRequest;
use App\Repositories\Teacher\CompositionRepository;
use App\Repositories\Teacher\TeacherRepository;
use App\Validators\Teacher\CompositionValidator;
use Illuminate\Support\Facades\Input;


class CompositionsController extends Controller{

    use CurlRecordMethod;

    protected $index_page='teacher.composition.compositionMain';
    protected $add_page='teacher.composition.compositionAdd';
    protected $edit_page='teacher.composition.compositionEdit';

    protected $repository;
    protected $validator;
    protected $request;

    public function __construct(CompositionRepository $repository, CompositionValidator $validator,CompositionBaseRequest $compositionBaseRequest)
    {
        $this->repository = $repository;
        $this->validator  = $validator;
        $this->request    = $compositionBaseRequest;
    }

    public function getBaseQueryCriteria(){
        return new CompositionBaseQueryCriteria;
    }

    protected function get_add_data(){
        $teacher_id=Input::get('teacher_id');
        return view($this->add_page,compact('teacher_id'));
    }

}
